﻿using BasicFrameworkDemo.Model;
using BasicFrameworkDemo.Utility;

namespace BasicFrameworkDemo.Web.Tests
{
    using BasicFrameworkDemo.IBLL;

    using Castle.Windsor;

    using NUnit.Framework;

    [TestFixture]
    public class TestBase
    {
        protected readonly NHibernateUtility NHibernateUtility = NHibernateUtility.GetInstance();
        protected readonly FluentNHibernateUtility FluentNHibernateUtility = FluentNHibernateUtility.GetInstance();
        protected readonly SystemErrors SystemErrors = SystemErrors.GetInstance();
        protected readonly Log4NetUtility Log4NetUtility = Log4NetUtility.GetInstance();
        protected readonly CastleUtility CastleUtility = CastleUtility.GetInstance();

        public TestBase() 
        {
            //this.SystemErrors.Config();
            //this.Log4NetUtility.Config();
            //this.NHibernateUtility.Config();
            this.FluentNHibernateUtility.Config();
            this.CastleUtility.Config();
            var system = this.CastleUtility.Container.Resolve<IAppSystem>();
            system.Initialize();
        }

        [TestFixtureSetUp]
        public virtual void TestSetUp()
        {
           
        }

        [TestFixtureTearDown]
        public virtual void TestTearDown()
        {

        }
    }
}
